﻿@model IEnumerable<Db8.Data.Claim>
@{
    ViewBag.PageId = "Index";
    Layout = "~/Views/Mobile/_Layout.cshtml";
}
<div data-role="page" id="@ViewBag.PageId" class="type-home" data-theme="a">
    <div data-role="header" data-position="fixed">
        <div data-role="navbar" role="navigation">
            <ul class="ui-grid-b">
            <li class="ui-block-a">@Html.ActionLink("SEARCH", "Index", "Mobile", new { search = Request.QueryString["search"] }, new { @class = "no-Ajax ui-btn ui-btn-up-b ui-btn-active", rel = "external" })</li>
            <li class="ui-block-b">@Html.ActionLink("BROWSE", "Browse", "Mobile", new { search = Request.QueryString["search"] }, new { @class = "no-Ajax ui-btn ui-btn-up-b", rel = "external" })</li>
            <li class="ui-block-c">@Html.ActionLink("SUMMARY", "Summary", "Mobile", new { search = Request.QueryString["search"] }, new { @class = "no-Ajax ui-btn ui-btn-up-b", rel = "external" })</li>
            </ul>
        </div>
@using (Html.BeginForm("Index", "Mobile", FormMethod.Get, new { rel = "external" }))
{
<div style="margin: 0.4em;" id="searchinput">
    <input type="search" name="search" id="search" value="@Request.QueryString["search"]" data-theme="b" />
</div>
}
    </div>
    <div data-role="content">
        @if (Model.Count() == 0)
        {
            <div style="vertical-align: middle;text-align:center;">
                Search claims and talking points
            </div>
        }
        else
        {
            <ul data-role="controlgroup" data-theme="b" >
            @foreach (var item in Model)
            {
                <li data-role="controlgroup">
                @Html.DisplayFor(modelItem => item.Statement)
                @foreach (var counterClaim in item.CounterClaims)
                {
                    <input type="checkbox" name="CounterClaim" id="chk-@counterClaim.ClaimId" value="@item.ClaimId/@counterClaim.ClaimId" data-theme="b" /><label for="chk-@counterClaim.ClaimId">@Html.DisplayFor(modelItem => counterClaim.Claim.Statement)</label>
                }
                </li>
            }
            </ul>
        }
    </div>
    <div data-role="footer" data-theme="a" data-position="fixed" style="text-align: center; padding:0;">
        <div style="paddding:0;margin:0;">
            <a class="no-Ajax" rel="external" href="@Url.Action("ViewMode", "Home", new { mode = "full" })">view full site</a>
        </div>
    </div>
</div>
@section scripts {
<script type="text/javascript">
</script>
}